package com.king.pattem.pool;

public class User {

	private String name;

	private String pwd;

	private int age;

	private String remark;

	public User() {
	}

	public User(String name, String pwd) {
		this.name = name;
		this.pwd = pwd;
	}

	public User(String name, String pwd, int age) {
		this.name = name;
		this.pwd = pwd;
		this.age = age;
	}

	public User(String name, String pwd, int age, String remark) {
		this.name = name;
		this.pwd = pwd;
		this.age = age;
		this.remark = remark;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;

		User user = (User) o;

		if (!name.equals(user.name)) return false;
		if (!pwd.equals(user.pwd)) return false;

		return true;
	}

	@Override
	public int hashCode() {
		int result = name.hashCode();
		result = 31 * result + pwd.hashCode();
		return result;
	}

	@Override
	public String toString() {
		return "User{" +
				"name='" + name + '\'' +
				", pwd='" + pwd + '\'' +
				", age=" + age +
				", remark='" + remark + '\'' +
				'}';
	}
}